﻿using System;
using System.Collections;
using System.ComponentModel;
using System.Windows.Forms.Design;

namespace HML.Design
{
    /// <summary>
    /// PaginationBar控件设计模式行为
    /// </summary>
    public class PaginationBarDesigner : ControlDesigner
    {
        public override SelectionRules SelectionRules
        {
            get
            {
                return base.SelectionRules & ~(SelectionRules.TopSizeable | SelectionRules.BottomSizeable);
            }
        }

        public override void Initialize(IComponent component)
        {
            base.Initialize(component);

            PaginationBar control = (PaginationBar)this.Control;
            int limitpages = 5;
            int records = 200;
            int pagesize = 10;
            int currentpage = 6;
            control.SetPagination(limitpages, records, pagesize, currentpage);
        }

    }
}
